package com.bdk.middle.order.api.client;


import com.bdk.middle.common.result.ResultDO;
import com.bdk.middle.order.api.domain.TransactionDO;
import com.bdk.middle.order.api.query.TransactionQueryDO;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Reagan
 * @since 2021-03-18
 */
public interface TransactionClientApi {

    /**
     * 添加用户
     * @param domain 用户DO
     * @return ResultDO
     */
    @RequestMapping(value="/transaction_api/add.html", method = RequestMethod.POST)
    public @ResponseBody
    ResultDO add(@RequestBody TransactionDO domain);

    /**
     * 修改用户信息
     * @param domain 用户DO
     * @return ResultDO
     */
    @RequestMapping(value="/transaction_api/edit.html", method = RequestMethod.POST)
    public @ResponseBody ResultDO edit(@RequestBody TransactionDO domain);

    /**
     * 修改用户信息
     * @param id
     * @param status
     * @return ResultDO
     */
    @RequestMapping(value="/transaction_api/updateStatus.html", method = RequestMethod.POST)
    public @ResponseBody ResultDO updateStatus(@RequestParam("id")String id, @RequestParam("status")int status);


    /**
     * 删除用户
     * @param id 用户ID
     * @return ResultDO
     */
    @RequestMapping(value="/transaction_api/remove.html", method = RequestMethod.POST)
    public @ResponseBody ResultDO remove(@RequestParam("id")String id);

    /**
     * 查找用户列表分页
     * @param domain 查询DO
     * @return ResultDO
     */
    @RequestMapping(value="/transaction_api/find.html", method = RequestMethod.POST)
    public @ResponseBody ResultDO find(@RequestBody TransactionQueryDO domain);
}
